#include<iostream>
#include<thread>
#include<chrono>
using namespace std;

void threadA(int n) {
	this_thread::sleep_for(chrono::seconds(n));
	cout << "hello\n";
}

void threadB(int n) {
	this_thread::sleep_for(chrono::seconds(n));
	cout << "world\n";
}

int main() {
	thread A(threadA, 1);
	thread B(threadB, 1);

	A.join();
	B.join();
}